1. Field of the Invention
The present invention relates to a recording device, a recording-medium-management method, a program of the recording-medium-management method, and a recording medium recorded with the program of the recording-medium-management method, and can be used for a digital still camera, for example. The present invention allows for storing data on free capacity of the recording medium in a nonvolatile memory independently. Further, the present invention allows for confirming the recorded free-capacity data on the basis of the total capacity of the recording medium and starting recording data when the recording device is started. Subsequently, it becomes possible to access the recording medium correctly on the basis of the free-capacity data when the free-capacity data on the recording medium is stored in the nonvolatile memory independently.
2. Description of the Related Art
In the past, recording devices including a digital video camera, the digital still camera, and so forth record file data including data on video, a still image, and so forth onto various changeable recording mediums including a memory card, an optical disk, and so forth. Therefore, when a recording medium is loaded into the above-described recording device and the power of the recording device is turned on, the recording device detects data on the free capacity of the recording medium and records the file data of various types onto the recording medium only when the recording medium has enough free capacity.
Japanese Unexamined Patent Application Publication No. 2005-228380 discloses a method of using the free capacity of the recording medium for data backup in combination with an auxiliary memory.
When detecting the free-capacity data on the recording medium, an entire file-allocation table relating to a file-management system of the recording medium should be searched. In that case, the time required to detect the free-capacity data increases by as much as the time required to make the search. Thus, the above-described recording device has to wait until the recording device becomes capable of recording data after the power is turned on by as much as the time required to detect the free-capacity data.
The above-described problem can be solved by providing the nonvolatile memory in the recording device independently and storing and holding the free-capacity data on the recording medium in the nonvolatile memory.
FIG. 9 shows a flowchart illustrating processing procedures performed by the recording device when the power is turned on, where the free-capacity data on the recording medium is stored in the nonvolatile memory. In that case, when the power is turned on, a controller which controls operations of the recording device advances from step SP1 to step SP2 where the controller starts the recording medium. Then, at step SP3, the controller determines whether or not the recording medium is replaced with another recording medium. For making the determination, a switch is used, so as to switch a contact point to another contact point by being triggered by mounting and/or removal of the recording medium onto and/or from the recording device. Namely, the determination is made by determining whether or not the contact point is switched to another contact point through the switch when the power is turned off. Thus, the controller is triggered by the switch of the contact point to start the operations of the recording device. Further, information about the contact-point switch is stored and held in the nonvolatile memory.
When a negative result is obtained, at step SP3, the controller advances from step SP3 to step SP4 so that the controller acquires information about free space of the recording medium from the nonvolatile memory and detects the free-capacity data on the recording medium. Then, at step SP5, the controller determines whether or not the recording medium has free capacity sufficient for recording file data including information about an image-pickup result or the like. When a negative result is obtained, at step SP5, the controller advances from step SP5 to step SP6 so that the controller notifies a user that the recording medium does not have the sufficient free space by displaying a message, for example, so as not to accept a photographing operation performed by the user.
On the contrary, if a positive result is obtained, at step SP5, the controller advances from step SP5 to step SP7 so that the controller sets an operation, so as to accept the photographing operation performed by the user. Then, at step SP8, the controller determines whether or not the user instructs to start photographing. If a negative result is obtained, at step SP8, the controller performs the processing corresponding to step SP8 again. On the contrary, if a positive result is obtained, at step SP8, the controller advances from step SP8 to step SP9 so that the controller starts performing a series of processing procedures relating to the photographing and records information about an image-pickup result onto the recording medium. Further, the controller updates the free-capacity data stored in the nonvolatile memory on the basis of the recorded image-pickup-result information.
On the other hand, when a positive result is obtained, at step SP3, the controller advances from step SP3 to step SP10 so that the controller waits until operations of the recording medium are started. After the operations of the recording medium are started, the controller detects information about the free space of the recording medium by using the file-management system of the recording medium and stores the free-space information in the nonvolatile memory, at step SP11. Then, the controller proceeds to step SP5. The above-described configuration allows for reducing the time required to start the recording device.
In the case where a device which stores the free-capacity data on the recording medium in the nonvolatile memory is used, where it is difficult to replace the recording medium with another recording medium, the processing corresponding to steps SP3, SP10, and SP11 can be omitted. Subsequently, the time required to start the device can be reduced by performing simple processing.
However, when the free-capacity data on the recording medium is stored and held in the nonvolatile memory over a long period of time, the free-capacity data may be garbled due to static electricity or the like. In that case, the value of the free-capacity data stored in the nonvolatile memory becomes different from that of real free capacity of the recording medium. Further, it becomes difficult to access the recording medium correctly depending on the free-capacity data stored in the nonvolatile memory, which hampers file recording even though the recording medium has free space.
The above-described recording device can be connected to an external device and/or apparatus such as a computer and used, as storage of the external device and/or apparatus. In that case, the external device and/or apparatus controls the file-management system of the recording medium. Therefore, the external device and/or apparatus accesses the recording medium irrespective of the free-capacity data stored in the nonvolatile memory. Subsequently, in the case where it is difficult to replace the recording medium with another recording medium, the value of the free-capacity data stored in the nonvolatile memory becomes different from that of the real free capacity of the recording medium due to the access to the recording medium, the access being made under the control of the external device and/or apparatus.
In that case, it becomes difficult for the above-described recording device to access the recording medium correctly depending on the free-capacity data stored in the nonvolatile memory.